'''
Structures for storing fasta(q) 
'''
import numpy as np

# default parameters.
name_width = 100
seq_width = 100
	

# basic fasta structure.
def basic_fasta(iss, nw=False, sw=False):
	# set name width.
	if nw != False:
		name_width = nw
	
	# set seq width.
	if sw != False:
		seq_width = sw
		
	# create structure.
	dt = np.dtype([\
		('NAME', np.str, name_width),\
		('SEQ', np.str, seq_width),\
	])

	return dt, np.zeros(iss, dtype=dt)
	
# basic fastq structure.
def basic_fasta_qual(iss, nw=False, sw=False):
	# set name width.
	if nw != False:
		name_width = nw
	
	# set seq width.
	if sw != False:
		seq_width = sw
		
	# create structure.
	dt = np.dtype([\
		('NAME', np.str, name_width),\
		('SEQ1', np.str, seq_width),\
		('QUAL1', np.str, seq_width),\
	])

	return dt, np.zeros(iss, dtype=dt)
	
# paired fasta structure.
def paired_fasta(iss, nw=False, sw=False):
	# set name width.
	if nw != False:
		name_width = nw
	
	# set seq width.
	if sw != False:
		seq_width = sw
		
	# create structure.
	dt = np.dtype([\
		('NAME', np.str, name_width),\
		('SEQ1', np.str, seq_width),\
		('SEQ2', np.str, seq_width),\
	])

	return dt, np.zeros(iss, dtype=dt)

# paired fasta structure.
def paired_fasta_qual(iss, nw=False, sw=False):
	# set name width.
	if nw != False:
		name_width = nw
	
	# set seq width.
	if sw != False:
		seq_width = sw
		
	# create structure.
	dt = np.dtype([\
		('NAME', np.str, name_width),\
		('SEQ1', np.str, seq_width),\
		('SEQ2', np.str, seq_width),\
		('QUAL1', np.str, seq_width),\
		('QUAL2', np.str, seq_width),\
	])

	return dt, np.zeros(iss, dtype=dt)
